﻿@using ClassifiedAds.IdentityServer.Models.ClientModels
@model  List<ClientModel>

<div class="row">
    <div class="col-12">
        <h2>Clients</h2>
    </div>

    <div class="col-12">
        <a asp-action="Add" class="btn btn-outline-primary mb-3"><span class="oi oi-plus"></span> Add Client</a>
    </div>

    <div class="col-12">
        @*@await Html.PartialAsync("Common/Search", new Search() { Action = "Clients", Controller = "Configuration" })*@
    </div>
</div>
<div class="row">
    <div class="col-12">
        <div class="table-responsive">
            <table class="table table-striped">
                <thead>
                    <tr>
                        <th></th>
                        <th>Client Id</th>
                        <th>Client Name</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    @foreach (var client in Model)
                    {
                        <tr>
                            <th><a class="btn btn-primary" asp-action="Edit" asp-route-id="@client.Id">Edit</a></th>
                            <td>@client.ClientId</td>
                            <td>@client.ClientName</td>
                            <td>
                                <a class="btn btn-danger" asp-action="Delete" asp-route-id="@client.Id"><span class="oi oi-x"></span></a>
                            </td>
                        </tr>
                    }
                </tbody>
            </table>
        </div>
    </div>
</div>

<div class="row">
    <div class="col-12">
        @*@await Html.PartialAsync("Common/Pager", new Pager { Action = "Clients", PageSize = Model.PageSize, TotalCount = Model.TotalCount, Search = ViewBag.Search, EnableSearch = true })*@
    </div>
</div>

